package com.forevershine.action;

import java.util.Date;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.opensymphony.xwork2.ActionSupport;

public abstract class BaseAction  extends ActionSupport  {
	
	private static Log log = LogFactory.getLog(BaseAction.class);
	
	private Date displayTime;
	private int taskid;
	
	
	public int getTaskid() {
		return taskid;
	}


	public void setTaskid(int taskid) {
		this.taskid = taskid;
	}


	public String execute()
	{
		System.out.println("Entering : "+this.getClass().getName());
		calculateDisplayTime();
		
		return service();
		
	}


	private void calculateDisplayTime() {
		displayTime = new Date();
		loadCurrentTaskTypePeriod();
		loadStartTime();
		
	}


	private void loadStartTime() {
		// TODO Auto-generated method stub
		
	}


	private void loadCurrentTaskTypePeriod() {
		// TODO Auto-generated method stub
		
	}


	protected abstract String service() ;

}
